package icu.hsu.apisdk.exception;

import lombok.Data;

/**
 * 错误响应模型
 * @ClassName: ErrorResponse
 * @author Hsu琛君珩
 * @date 2024-09-08
 * @apiNote
 * @Version: v1.0
 */
@Data
public class ErrorResponse {
    private String message;
    private int code;

    public ErrorResponse(ErrorCode errorCode) {
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }

    public ErrorResponse(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
